<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 数组解构
        // let arr = [1,2,3,4,5];

        // let [a,b,c,d,e] = arr;

        // 数组解构 - 顺序是按照数组顺序赋值的
        // let [b,d,c,a,e] = arr;

        //忽略元素 - 指定某些值的变量
        // let [a,,c,,e] = arr;

        // 交换变量

        // let arr = [1,2];
        // let [a,b] = arr;

        // let [b,a] = arr;
        // // console.log(a,b); //1,2


        // console.log('a='+a,'b='+b);

    </script>
</body>
</html>